﻿using System;
using System.Collections.Generic;
using System.Linq;

public class Person
{
    public int hitung(int n)
    {
        int cost = 0;

        switch (n)
        {
            case 1:
                cost += 5;
                goto case 2;
            case 2:
                cost += 25;
                break;
            case 3:
                cost += 50;
                goto case 1;
            default:
                throw new Exception("Invalid value");
        }

        return cost;
    }
    
}


public class MainProgram
{
    public static void Main()
    {
        int result = 0;
        Person coba = new Person();

try
{
    for (int i = 1 ; i < 5 ; i++)
    {
        result += coba.hitung(i);
    }
}
catch
{
    result -= 10;
}
    }

    public int DoCalculate(int n)
{
    int cost = 0;
    
    switch(n)
    {        
        case 1:
            cost += 5;
            goto case 2;
        case 2:
            cost += 25;
            break;
        case 3:
            cost += 50;
            goto case 1;
        default:
            throw new Exception("Invalid value");
    }

    return cost;
}


// ======== Main Block Start ========


}